package maze.pojo;

public enum Action {
	NONE(0), LEFT(1), RIGHT(2), UP(4), DOWN(8);

	public final int bit;

	private Action(int bit) {
		this.bit = bit;
	}

	public static Action getAction(int n) {
		switch (n) {
		case 1:
			return LEFT;
		case 2:
			return RIGHT;
		case 4:
			return UP;
		case 8:
			return DOWN;
		default:
			return NONE;
		}
	}

}
